package com.hmall.user.mapper;

import com.hmall.user.pojo.Address;
import com.hmall.user.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    /**
     * 根据用户id查询地址簿
     * @param userId
     * @return
     */
    @Select("select * from tb_address where user_id = #{userId}")
    List<Address> findUserAddress(Long userId);
}